﻿public class Solution {
    public int FindLengthOfLCIS(int[] nums)
    {
        int[] dp = new int[nums.Length];
        Array.Fill(dp, 1);

        int res = 1;
        for (int i = 1; i < nums.Length; i++)
        {
            if (nums[i] > nums[i - 1]) dp[i] = dp[i - 1] + 1;
            if (dp[i] > res) res = dp[i];
        }

        return res;
    }

    public static void Main(string[] args)
    {
        int[] nums = [1, 3, 5, 4, 7];
        Solution solution = new Solution();
        int res = solution.FindLengthOfLCIS(nums);
        Console.WriteLine(res);
    }
}